package com.ayoka.ui.operate_result;

import android.os.Bundle;
import android.view.View;

import com.ayoka.R;
import com.ayoka.base.BaseFragment;
import com.ayoka.base.BasePresenter;
import com.ayoka.databinding.FragmentBespokeCoachBinding;

import java.io.Serializable;

/**
 * @author jcp
 * @ClassName: TopicListActivity
 * @Description:
 * @date 2018-12-28 下午4:21:18
 */
public class OperateBespokeCoachFragment extends BaseFragment<FragmentBespokeCoachBinding, BasePresenter> {

    public static OperateBespokeCoachFragment newInstance(Serializable argument) {
        OperateBespokeCoachFragment bespokeCoachFragment = new OperateBespokeCoachFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable("Argument", argument);
        bespokeCoachFragment.setArguments(bundle);
        return bespokeCoachFragment;
    }

    private Serializable argument;

    @Override
    protected void configBundleArguments() {
        argument = getArguments().getSerializable("Argument");
    }

    @Override
    public int getContentLayout() {
        return R.layout.fragment_bespoke_coach;
    }

    @Override
    protected void initViews(View view) {
        mDataBinding.btnComplete.setOnClickListener(this);

        String bespokeData = (String)argument;
        mDataBinding.tvContent.setText("预约时间：" + bespokeData);
    }

    @Override
    public void initData(){
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    public void onClick(View view) {
        super.onClick(view);
        if (view == mDataBinding.btnComplete){
            getActivity().finish();
        }
    }
}
